<link rel="stylesheet" type="text/css" href="./css/bbbb.css" />

<div class="headTop">
	<div class="main clearFix">
		<ul class="topLeft clearFix">
			<li>
				<img src="./images/zhuceyouli.gif" alt="">
				<a href="#" class="registergo">注册有礼</a>
			</li>
			<li>
				<span>|</span>
			</li>
			<li>
				<a href="#" id="loadingo">登录</a>
				<a href="#" id="loadinalready">退出登录</a>
			</li>
			<li><span>|</span></li>
			<li><a href="#">收藏</a></li>
		</ul>
		<ul class="topRight">
			<li><a href="#">在线咨询</a></li>
			<li><span>|</span></li>
			<li>
				<a href="#">手机版</a>
				<div class="appImg">
					<div class="aImg">
						<img src="./images/QR_code.png" alt="">
						<p>扫码下载APP</p>
					</div>

				</div>

			</li>
			<li><span>|</span></li>
			<li class="linkWeibo"><a href="#"></a></li>
		</ul>
	</div>
</div>
<div class="headBtm">
	<div class="main clearFix">
		<a href="#"></a>
		<a href="#"></a>
		<div class="inputRight">
			<div class="input">
				<input type="text" placeholder="MOSCHINO 莫斯奇诺">
				<div class="searchBtn"></div>
			</div>

		</div>
	</div>
</div>

<script>
	(function () {
		$(document).on("click", ".registergo", function () {
			location.href = "./register.html"
		})






		//判断是否登录?
		$.ajax({
			url: "./../server/isLogin.php",
			dataType: "json"
		}).then(function (res) {

			if (res.status == true) {

				$("#loadinalready").show()
				$("#loadingo").hide()

				
			} else {
				console.log($("#loadinalready"))
				$("#loadingo").show()
				$("#loadinalready").hide()
			}
		})

		$(".box").on("click", "#loadinalready", function () {
			$.ajax({
				url: "./../server/exitlogin.php",
				dataType: "json"
			}).then(function (res) {
				
			})
			layer.msg("已退出")
			localStorage.clear()
			setTimeout(()=>{
				window.location.reload()
			},1000)
			
		})

		$(".box").on("click", "#loadingo", function () {
			location.href = "./loading.html"
		})


	})()
</script>